<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
  <meta charset="UTF-8">
  <title>订单列表</title>
  <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
  <script th:src="@{/js/jquery-3.6.0.min.js}"></script>
</head>

<body>
  <div class="panel panel-primary">
    <div class="panel-heading">
      <div th:replace="~{header}">
      </div>
    </div>
  </div>
  <br><br>

  <div class="container">
    <div class="panel panel-primary">
      <div class="panel-heading">
        <h3 class="panel-title" th:text="${session.loginUser.username}+'的订单列表'"></h3>
      </div>

      <div class="panel-body">
        <div class="table table-responsive">
          <table id="tb" class="table table-hover  table-bordered ">
            <thead>
              <tr style="background:#eda000;color: #fff;">
                <th>序号</th>
                <th>oid</th>
                <th>下单用户</th>
                <th>商品名称</th>
                <th>邮寄地址</th>
                <th>电话号码</th>
                <th>数量</th>
                <th>金额</th>
                <th>下单时间</th>
              </tr>
            </thead>
            <tbody class="text-left">
              <tr th:each="o, stat : ${orders}">
                <td th:text="${stat.index + 1}">序号</td>
                <td th:text="${o.oid}">oid</td>
                <td th:text="${o.username}">下单用户</td>
                <td th:text="${o.goodsname}">商品名称</td>
                <td th:text="${o.mailingaddress}">邮寄地址</td>
                <td th:text="${o.rphone}">电话号码</td>
                <td class="text-right" th:text="${o.quantity}">数量</td>
                <td class="text-right" th:text="${o.money}">金额</td>
                <td th:text="${#temporals.format(o.buytime, 'yyyy-MM-dd HH:mm')}">下单时间</td>
              </tr>
            </tbody>
          </table>
        </div>

      </div>
    </div>
  </div>

</body>

</html>